export interface ActionModel {
  primaryKey: string;
  moduleId: string | number;
  record: Indexable;
}

export interface ActionItemModel {
  primaryKeys: Recordable;
  record: Indexable;
}

export interface SearchColumn {
  dataIndex: string;
  title: string;
  searchType: number;
  options: any[];
  labelSpan: number;
  colNum: number;
  displayCondition: any[];
}

export type Callback = (opt?: any) => Promise<any> | void;

export interface InitModalParams {
  moduleId: string | number;
  dataModelId: string;
  params: Indexable;
  isUpdate?: boolean;
  width?: string | number;
  placement?: string;
}

export enum ComponentTypeEnum {
  'Input',
  'InputNumber',
  'ApiSelect',
  'ApiTreeSelect',
  'RadioGroup',
  'CheckboxGroup',
  'DatePicker',
  'Switch',
  'Upload',
  'IconPicker',
  'InputTextArea',
  'InputPassword',
  'RangePicker',
  'Hide',
}

export enum SEARCH_TYPE {
  'DISABLED',
  'CONDITON' = 3,
  'OPTIONS' = 5,
  'DATE' = 6,
  'DICT' = 7,
  'REAL_TABLE' = 8,
}

export enum LIST_FIELD_TYPE {
  'LINK_FIELD_TYPE' = 1, // 链接字段类型
  'OPTION_FIELD_TYPE' = 3, // 分类值字段类型
  'IMG_FIELD_TYPE' = 4, // 图像字段类型
  'RELA_FIELD_TYPE' = 7, // 关联表字段类型
  'SUB_FIELD_TYPE' = 8, // 子表字段类型
  'MIX_FIELD_TYPE' = 11, // 复合字段类型
  'DICT_FIELD_TYPE' = 13, // 字典字段类型
}

export enum DelBatchType {
  DELETE = 'delete',
  FLOWDELETE = 'flow-delete',
  FLOWHANDROUNDDELETE = 'flow-handround-delete',
}
